package org.yenn.proxy.static1.impl;

import lombok.extern.slf4j.Slf4j;
import org.yenn.proxy.static1.Moveable;

import java.util.Random;
@Slf4j
public class Car1 implements Moveable {

	@Override
	public void move() {
		long starttime = System.currentTimeMillis();
		log.info("汽车开始行驶....");
		//实现开车
		try {
			Thread.sleep(new Random().nextInt(1000));
			log.info("汽车行驶中......");
		} catch (InterruptedException e) {
			e.printStackTrace();
		}

		long endtime = System.currentTimeMillis();
		log.info("汽车结束行驶....  汽车行驶时间：{}毫秒！" ,(endtime - starttime)  );

	}

}
